import requests
from bs4 import BeautifulSoup

# 发送HTTP请求获取网页内容
url = 'https://www.baidu.com'
response = requests.get(url)

# 使用BeautifulSoup解析网页内容
soup = BeautifulSoup(response.text, 'html.parser')

# 查找网页标题并打印输出
title = soup.title.string
print('网页标题:', title)